

import java.util.Scanner;

class IllegalScoreException extends Exception {

	public IllegalScoreException(String message) {
		super(message);
	}

}

class IllegalNameException extends RuntimeException {

	public IllegalNameException(String message) {
		super(message);
	}

}

class Student {
	private String name;
	private int score;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
		if (Character.isDigit(name.toCharArray()[0])) {
			throw new IllegalNameException("the first char of name must not be digit, name=");
		}
	}

	public int getScore() {
		return score;
	}

	public int addScore(int score) throws IllegalScoreException {
		this.score = score;
		if (score > 100 || score < 0) {
			throw new IllegalScoreException("score out of range, score=");
		}
		return score;
	}

	public String toString() {
		return "Student [name=" + name + ", score=" + score + "]";
	}
}

public class Main54 {
	public static void main(String[] arges) {
		Scanner sc = new Scanner(System.in);
		Student st = new Student();
		while (sc.hasNextLine()) {
			String str = sc.nextLine();
			if (str.equals("new")) {
				try {
					String str1 = sc.nextLine();
					Scanner scanner=new Scanner(str1);
					st.setName(scanner.next());
					st.addScore(scanner.nextInt());
					System.out.println(st.toString());
				} catch (IllegalNameException e) {
					System.out.println(e + "" + st.getName());
				} catch (IllegalScoreException e) {
					System.out.println(e + "" + st.getScore());
				} catch (Exception e) {
					System.out.println(e);
				}

			} else
				break;

		}

		sc.close();
		System.out.println("scanner closed");
	}

}